package co.edu.eam.iso.view.listmodel;

import java.util.ArrayList;
import java.util.List;

import javax.swing.DefaultListModel;

/**
 * @author Giovanny Ramirez
 */
public class EvaluationListModel extends DefaultListModel {

	private static final long serialVersionUID = 1L;

	private List<String> fileNames;

	public EvaluationListModel() {
		this.fileNames = new ArrayList<String>();
	}

	public void addFileName(String fileName) {
		fileNames.add(fileName);
	}
	
	public void removeFileName(int index) {
		fileNames.remove(index);
	}
	
	public boolean existFileName(String fileName) {
		for (String name : fileNames) {
			if (fileName.equals(name)) {
				return true;
			}
		}
		
		return false;
	}

	public List<String> getFileNames() {
		return fileNames;
	}
	
}
